home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 June
/
EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso
/
earcd
/
utmisc2
/
cookies.lha
/
Cookies
/
Cookies.doc
< prev
next >
Wrap
Text File
|
1996-05-08
|
9KB
|
254 lines
Cookies version 0.41
====================
1. What is Cookies?
-------------------
Cookies is two things:
a/ A little fortune cookie program (can be quite funny)
b/ A complete waste of disk space (it isn't particularly useful)
2. Installing Cookies
---------------------
Umm, this is *really* tricky :-) Just drag the Cookies and Cookies.txt icons
to where-ever you wanna put the program. Works off floppy or hard drive.
There are no assigns to put in Startup-Sequence or anything. This is a good
thing because no-one would want to bother with assigns for a fortune cookie
program.
In addition, if you want to use the program from Workbench, then
reqtools.library must be installed in LIBS: Cookies needs version 38 or
above of reqtools.library. This version has been included in the archive.
If you already have reqtools.library v38 or above installed, do *not*
reinstall from this version. However, if you do not have reqtools.library
installed, or have an old version, you should copy the supplied version into
your LIBS: directory. The version supplied will work on all versions of
AmigaOS from 1.3 up.
3. Using Cookies
----------------
A. From Workbench
Double click on the icon. The program will check that Cookies.txt is in the
current directory and will refuse to run if it isn't. Assuming you followed
the highly technical installation procedure outlined above, Cookies will open
its window and display a random message from the text file.
The Cookies window has four buttons along the bottom; these are:
ANOTHER SPECIFIC ABOUT QUIT
Clicking ANOTHER will pick another cookie at random and display it.
By clicking SPECIFIC, you can pick a cookie from the file to display. It
will open a window with a prompt in; you then enter the cookie number that
you want. For example, if Cookies.txt contains 100 cookies, you can enter a
number from 1 to 100. So, if you have a lucky number, you can see which
cookie it corresponds to!
Clicking ABOUT opens a window with the program credits in.
Clicking QUIT err... quits.
You can run Cookies from your WBStartup drawer. Just drag its icon into
the drawer, along with Cookies.txt. WARNING: if you do this, you must
delete Cookies.txt's icon using the Shell. To recap: to run the program
from WBStartup, the following three files have to go in the drawer:
Cookies
Cookies.info
Cookies.txt
*NOT* Cookies.txt.info. This will cause problems!
B. From Shell
Ensure that you are in the directory in which you have places Cookies.txt.
Type
cookies
at the Shell prompt. The program will pick a cookie, display it in the
Shell window, and exit. This is good for generating random .signature files
for email. You could put something like
cookies >S:.signature
in your Startup-Sequence and have a different email signature every time you
boot.
Cookies takes one switch from the Shell: WINDOW. It instructs the program
to act as if it is run from Workbench. So you could do something like
run <NIL: >NIL: cookies window
in your Startup-Sequence and have it run everytime you boot up, just for
laughs!
If you run in the Shell without WINDOW mode on, it won't attempt to open
reqtools.library, as the requester functions are not needed just for writing
to the Shell. So if you can't/don't/won't install reqtools.library, you
can still use Cookies. You lucky people! :-)
4. Cookies.txt file format
--------------------------
You put the messages one by one in the file, with a blank line between each
one, and the cursor stopping on a blank line at the end of the file. For
example, a legal (but short) cookies.txt would be:
No matter where you go, there you are.
"Doctor, Doctor, I've broken my arm in three places."
"Then you shouldn't go to those places"
Life, don't talk to me about life...
#
(The hash symbol represents where the cursor finishes up in the editor.
There are no lines after this).
The above file contains three cookies; the first and third have one line
each; the second has two lines. You may have up to nine lines per cookie.
Examine the included Cookies.txt to get to know the file format; it really
is easy. Once you've got to grips with it (which should take all of two
seconds), you can add more cookies to it. I keep mine in alphabetical
order; this is not compulsory.
You can put blank lines in your cookies, eg if you wanted something like:
If God is for us, who can be against us?
Romans 8:31
to appear, place one or more spaces on the line you wish to be left blank.
I got these cookies mainly from the fortune.txt file in with the NorthC
distribution by Steve Hawtin. I removed the rude ones and added some more.
I also changed the file format to make it easier (I think :-) to process.
My program code is not based in any way on Steve's; it is my own work.
5. Bugs
-------
Cookies is SLOOOOOOW from floppy disk. Sorry :-( It runs at a perfectly
acceptable speed from hard disk. This may be fixed in a later version by
reading the entire Cookies.txt into memory.
Each cookie can have only a maximum of 255 characters. This includes
newlines, and the "Thought for the day..." message which appears at the
beginning. I think 255 chars should be enough for most people. This is
a restriction in HS Pascal and there is nothing I can do about it, short
of buying a C compiler, and I don't want to do that...
Cookies has been tested under AmigaOS 1.3, 3.0, and 3.1, on various machine
architectures and configurations. It performed admirably in each case.
6. History
----------
Cookies v0.1
Pitiful, bugged, lame... it worked (just); that was about all.
Cookies v0.2
Now we are getting somewhere. This version was cleaner. There's a lot
wrong with it though - window opens quite big, no matter how long the
message. You can only display one message; then you have to quit and re-
load (yawn).
Cookies v0.21
A bug fix - the window title sometimes got corrupted.
Cookies v0.22
The window now re-sizes around the message.
Some more bugs fixed, and lots of little changes to the code.
Cookies v0.30
File handling is now a little faster, though not as fast as I'd like...
Window initially opens as small as possible, and expands to accomodate the
message.
More memory efficient.
Text has 1 pixel extra space between lines (easier to read)
This is the first 'multiple-cookie' version - you can now load another
cookie by pressing the right mouse button when the window is active. This
is a time saver if you happen to be in a cookie mood.
Code reorganized using ARP library to make my life easier.
Cookies v0.31 PUBLIC RELEASE
Got rid of ARP; I could manage okay without.
Cookies v0.32 PUBLIC RELEASE
Code cleaned up a little; now a bit more efficient. Functionality is
exactly the same as v0.31.
Cookies v0.32a, b, c
Bug fixes and code cleanup. Recompiled using AmigaOS 3.1 includes
Cookies v0.4
First Reqtools version. Now opens a nice window with buttons and stuff.
'About' feature added
Cookies v0.41 PUBLIC RELEASE
'Specific' feature added
Now can print a cookie straight to Shell window, doesn't need reqtools
for this
7. Plans for the future
-----------------------
Rewrite without Reqtools, using just Intuition requesters. Might take a
while as I have no Intuition autodocs. Anybody wanna buy me an RKM? :-)
Implement support for PowerPacked cookie files using powerpacker.library,
or even other crunchers using xfdmaster.library.
Read the entire file into memory; operation is faster, with the trade-off
that the program might need over 100Kb to run.
8. All about me
---------------
I am a student with enough spare time to write useless programs in Pascal;
I'm not actually wasting my time; this is good practice. It also beats
coding Amiga stuff in C, which is (1) confusing and (2) expensive. This
proggy was written in HS Pascal, which was not that cheap, but cheaper (and
friendlier :-) than C.
If you wanna contact me, you can do so by email during University term time.
Just point your mailer at:
steffan@dcs.warwick.ac.uk
or you can send snail mail to:
Stephen Williams,
9, Helmsley Way,
Spalding,
Lincolnshire,
PE12 6BG,
England.
I also have a World Wide Web page:
http://www.warwick.ac.uk/~csuxg/
The latest version of Cookies should always be available from here, or from
the Aminet.
Please pass Cookies on to your Amiga-owning friends. It's fun and, well,
somebody might like it. Perhaps.
Cookies is Message-ware. This is like Freeware (ie the program is free but
you can't mess about with it), except that if you use it, I'd like it if
you'd email me or write a letter. I would also be grateful if you'd send
me some feedback about Cookies.
9. Credits
----------
reqtools.library and associated development tools were written by Nico
Francois. Thanks Nico :-)
10. Other stuff by me
---------------------
I have also written numerous MED modules. If you want a listen then email
me and I'll send one back to you.
Okay, end of doc. Boredom over...
Byeeeeeee.......